export const Dictionary = (function () {
    function Dictionary() {
        this.items = {};
    }
    Dictionary.prototype.add = function (key, value) {
        this.items[key] = value;
    };
    Dictionary.prototype.remove = function (key) {
        if (this.has[key]) {
            delete this.items[key];
            return true;
        }
        else {
            return false;
        }
    };
    Dictionary.prototype.has = function (key) {
        return key in this.items;
    };
    Dictionary.prototype.get = function (key) {
        return this.has(key) ? this.items[key] : undefined;
    };
    Dictionary.prototype.clear = function () {
        this.items = {};
    };
    Dictionary.prototype.size = function () {
        var count = 0;
        for (var prop in this.items) {
            if (this.items.hasOwnProperty(prop))
                ++count; //{7} 
        }
        return count;
    };
    Dictionary.prototype.keys = function () {
        var values = [];
        for (var k in this.items) {
            if (this.has(k)) {
                values.push(k);
            }
        }
        return values;
    };
    Dictionary.prototype.values = function () {
        var values = [];
        for (var k in this.items) {
            if (this.has(k)) {
                values.push(this.items[k]);
            }
        }
        return values;
    };
    Dictionary.prototype.getItems = function () {
        return this.items;
    };
    return Dictionary;
}());